package com.intech.android.demo.cms.validators;


public class GraphicContentValidator extends Validator
{
    String budget;
    String viewingCost;
    String delayTime;

    public GraphicContentValidator(String budget, String viewingCost, String delayTime)
    {
        this.budget = budget;
        this.viewingCost = viewingCost;
        this.delayTime = delayTime;
    }

    @Override
    public void check()
    {
        try
        {
            Double.parseDouble(budget);
            Double.parseDouble(viewingCost);
            Long.parseLong(delayTime);
            valid = true;
        }
        catch (NumberFormatException e)
        {
            valid = false;
            message = "Entered value should be number!";
        }

    }
}
